<!-- 测试 -->

<script setup lang="ts">
import { reactive } from 'vue';
import { ref } from 'vue'
const count = ref(0);
/**
 * 创建响应式对象
 */
let wealth = reactive({
  car: { name: "Benz", price: 1000000 },
  house: { name: "别墅", price: 10000000 },
  bank_account: { name: "New York", total: 10000000000 },
  stock: { name: "Tesla", price: 10000000000 },
  cash: 10000000
})

function plus() {
  ++count.value;
}

</script>
<script  lang="ts">
export default {
  name: "Login3"
}
</script>

<template>
  <div>
    <button @click='count++'>{{ count }}</button>
    <button @click='plus'>{{ count }}</button>
    <h5>
      财产1：
      <input :value="wealth.car.name" />
      <input :value="wealth.car.price"/>
      <br />
    </h5>

    <h5>
      财产2：
      <input v-bind:value="wealth.bank_account.name" />
      <input v-bind:value="wealth.bank_account.total"/>
      <br />
      <input v-model="wealth.bank_account.name" />
      <input v-model="wealth.bank_account.total"/>
      <br />
    </h5>
    <h5>
      统计：
      <b></b>
    </h5>
  </div>
</template>

<style></style>